Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spawns Enhancement #1349

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

Coronia
Copy link
Contributor

@Coronia Coronia commented Aug 10, 2024

Help TwinkleStar to upload these new features

  • It is now possible to set the initial amount of spawnees for a spawner, instead of always being filled. Won't work if it's larger than SpawnsNumber.

In rulesmd.ini:

[SOMETECHNO]              ; TechnoType
InitialSpawnsNumber=      ; integer
  • It is now possible to spawn multiple types of spawnees from a spawner with Spawns.Queue. The order of spawnees in this queue is the order of their respawn.
    • Spawns still needs to be set to enable the spawner logic and act as a default spawnee.
    • SpawnsNumber still needs to be set to determine the amount of spawnee slots.
    • If the length of the queue is longer than the spawner's SpawnsNumber, spawnee after this length will be omitted. If the length is shorter however, the rest of the positions will be filled by the spawnee defined by Spawns. Hence, it's recommended to make them the same.

In rulesmd.ini:

[SOMETECHNO]        ; TechnoType
Spawns.Queue=       ; list of aircrafts in order

An example of Spawns.Queue:

[SOMETECHNO]
Spawns=AIRCRAFT1
SpawnsNumber=5
Spawns.Queue=AIRCRAFT1,AIRCRAFT2,AIRCRAFT1,AIRCRAFT2,AIRCRAFT3

In this case, it'll be built with 5 spawnees in the order of AIRCRAFT1->AIRCRAFT2->AIRCRAFT1->AIRCRAFT2->AIRCRAFT3, and so will be its respawn order if multiple of them being destroyed

Copy link

github-actions bot commented Aug 10, 2024

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

Copy link
Member

@MortonPL MortonPL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current implementation might contain a bug.

src/Ext/Techno/Hooks.Misc.cpp Outdated Show resolved Hide resolved
src/Ext/Techno/Hooks.Misc.cpp Outdated Show resolved Hide resolved
@MortonPL MortonPL self-assigned this Sep 24, 2024
@MortonPL MortonPL added Needs testing Feature / Enhancement Anything new not present in vanilla/Ares labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature / Enhancement Anything new not present in vanilla/Ares Needs testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants